cmake_minimum_required(VERSION 3.28.1)
project(rviz_plugin)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)


## This rviz_plugin includes Qt widgets, so we must include Qt like so:
find_package(
  Qt5
  COMPONENTS
    Core
    Gui
    Widgets
  REQUIRED
)
set(QT_LIBRARIES Qt5::Widgets Qt5::Core)


## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
  include
  ${Qt5Core_INCLUDE_DIRS}
  ${Qt5Gui_INCLUDE_DIRS}
  ${Qt5Widgets_INCLUDE_DIRS}
)

link_directories(${catkin_LIBRARY_DIRS})

## Here we specify which header files need to be run through "moc",
## Qt's meta-object compiler.
qt5_wrap_cpp(MOC_FILES
  include/widget.h
  include/demo.h
)

## Here we specify the list of source files, including the output of
## the previous command which is stored in ``${MOC_FILES}``.
set(SOURCE_FILES
  src/main.cpp 
  src/widget.cpp 
  ${MOC_FILES}
)

add_executable(main ${SOURCE_FILES})


target_link_libraries(main
  ${QT_LIBRARIES}
  ${catkin_LIBRARIES}
)

